<script setup lang="ts">
import { computed, ref } from 'vue'

const r = () => {
  return Math.random() * 10 + 1
}

let count = ref(0)

const n = computed(() => {
  return count.value % 2 == 0
})
</script>

<template>
<div>
  <h2>计算属性</h2>
  <div>{{ n }}</div>
  <button @click="count++">count++</button>
</div>
</template>

<style scoped>

</style>